package com.leinao.media.sdk.dh.common;

import com.leinao.media.sdk.dh.lib.NetSDKLib;
import com.sun.jna.Pointer;

import javax.swing.*;

/**
 * 断线回调函数，通知用户当前断开网络的设备，如果调用SDK的ClIENT_Logout函数主动断开的设备不作断线回调，设置为NULL时不回调
 *
 * @author zhangyu
 * @date 2022/2/19 17:59
 */
public class DisConnect implements NetSDKLib.fDisConnect {
    @Override
    public void invoke(NetSDKLib.LLong m_hLoginHandle, String pchDVRIP, int nDVRPort, Pointer dwUser) {

//        log.info("Device[%s] Port[%d] DisConnect!\n", pchDVRIP, nDVRPort);

        SwingUtilities.invokeLater(new Runnable() {
            @Override
            public void run() {
//                    frame.setTitle(Res.string().getCapturePicture() + " : " + Res.string().getDisConnectReconnecting());
            }
        });
    }
}
